package com.mx.nbainformation.biz;

import java.util.regex.Matcher;

import android.content.Context;

import com.mx.nbainformation.config.Constants;
import com.mx.nbainformation.util.FileUtil;
import com.mx.nbainformation.util.HttpUtil;

public class BizVideoPlay {
	private Context _context;
	public static String Result="";
	
	public BizVideoPlay(Context context)
	{
		_context=context;
	}
	
	public String getVideoPlayList(String url) {
		Result=HttpUtil.doGet(url, _context);
		if(Result==null)
		{
			return null;
		}
		Matcher m=FileUtil.getPattern(Constants.VideoPlayUrl, Result);
		if(!m.find())return null;
		String Target=m.group();
		Target=Target.replaceAll(Constants.VideoPlayUrlReplace1,"");
		Target=Target.replaceAll(Constants.VideoPlayUrlReplace2, "");
		return Target;
	}
}
